package base.interesting;

/**
 * @program JavaBase
 * @description: 多态
 * @author: zhanglu
 * @create: 2020-08-17 16:36:00
 */
public class PolymorphicTest {

    public static void main(String[] args) {
//        Father father = new Son();
//        System.out.println("end-" + father.money);

        int[][][] x = new int[0][1][2];


    }

}

class Father{
    public int money = 1;
    public Father(){
        this.money = 2;
        show();
    }
    public void show(){
        System.out.println("Father-" + this.money);
    }

}

class Son extends Father{
    public int money = 3;
    public Son(){
        this.money = 4;
        show();
    }
    public void show(){
        System.out.println("Son-" + money);
    }

}
